(function(){"use strict";BX.namespace("BX.Grid");BX.Grid.Utils={ajaxUrl:function(e,n){return this.addUrlParams(e,{bxajaxid:n})},addUrlParams:function(e,n){return BX.util.add_url_param(e,n)},arrayMove:function(e,n,t){if(t>=e.length){var i=t-e.length;while(i--+1){e.push(undefined)}}e.splice(t,0,e.splice(n,1)[0]);return e},getIndex:function(e,n){return[].indexOf.call(e||[],n)},getNext:function(e){if(e){return e.nextElementSibling||null}},getPrev:function(e){if(e){return e.previousElementSibling||null}},closestParent:function(e,n){if(e){if(!n){return e.parentNode||null}else{return BX.findParent(e,{className:n})}}},closestChilds:function(e){if(e){return e.children||null}},collectionSort:function(e,n){var t,i,l,r,a;if(e&&n&&e!==n&&e.parentNode===n.parentNode){t=this.closestParent(n);i=this.closestChilds(t);l=i.length;r=this.getIndex(i,e);a=this.getIndex(i,n);if(l===a){t.appendChild(n)}if(r>a){t.insertBefore(e,n)}if(r<a&&l!==a){t.insertBefore(e,this.getNext(n))}}},getColumn:function(e,n){var t=this.getIndex(this.closestChilds(this.closestParent(n)),n);var i=[];[].forEach.call(e.rows,function(e){i.push(e.cells[t])});return i},styleForEach:function(e,n){n=BX.type.isPlainObject(n)?n:null;var t=Object.keys(n);[].forEach.call(e||[],function(e){t.forEach(function(t){BX.style(e,t,n[t])})})},requestAnimationFrame:function(){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)};e.apply(window,arguments)},getByClass:function(e,n,t){var i=[];if(n){i=e?e.getElementsByClassName(n):[];if(t){i=i.length?i[0]:null}else{i=[].slice.call(i)}}return i},getByTag:function(e,n,t){var i=[];if(n){i=e?e.getElementsByTagName(n):[];if(t){i=i.length?i[0]:null}else{i=[].slice.call(i)}}return i},getBySelector:function(e,n,t){var i=[];if(n){if(t){i=e?e.querySelector(n):null}else{i=e?e.querySelectorAll(n):[];i=[].slice.call(i)}}return i},listenerParams:function(e){try{window.addEventListener("test",null,e)}catch(n){e=false}return e}}})();
//# sourceMappingURL=utils.map.js